<?php
   $link = mysql_connect("localhost", "root", "123");
   if (!$link) {
      echo "cant connect";
      die('Not connected : ' . mysql_error());
   }
   $db_selected = mysql_select_db("cenario", $link);
   if (!$db_selected) {
      echo "cant use";
      die ('Can\'t use foo : ' . mysql_error());
   }
?>